<script>
function getArchive(league, round, year, descriptionId) {
	document.getElementById("archiveForm").leagueId.value = league;
	document.getElementById("archiveForm").round.value = round;
	document.getElementById("archiveForm").year.value = year;
	
	document.getElementById("archiveForm").submit();
	document.getElementById("archiveDiv").innerHTML = "<center><h2>Retreiving results for " + getDescription(descriptionId) + "</h2></center>";
}
function getDescription(descriptionId) {
	if (descriptionId == 1) {
		return "SAD 2011";
	}
	else if (descriptionId == 2) {
		return "AAD 2011";
	}
	else if (descriptionId == 3) {
		return "Div 1 2010";
	}
	else if (descriptionId == 4) {
		return "Div 2 2010";
	}
	else {
		return "2009 League";
	}	
}
</script>

<div id="archiveDiv">
<table align="center" width="30%">
	<tr>
		<td><a href="javascript: getArchive(1, 20, 2011, 1);">SAD 2011</a></td>
	</tr>
	<tr>
		<td><a href="javascript: getArchive(2, 20, 2011, 2);">AAD 2011</a></td>
	</tr>
	<tr>
		<td><a href="javascript: getArchive(5, 17, 2010, 3);">Div 1 2010</a></td>
	</tr>
	<tr>
		<td><a href="javascript: getArchive(6, 17, 2011, 4);">Div 2 2010</a></td>
	</tr>
			<tr>
		<td><a href="javascript: getArchive(7, 18, 2009, 5);">2009 League</a></td>
	</tr>
</table>
</div>
<form id="archiveForm" target="hiddenFrame" action="../actions/displayArchive.php">
	<input type="hidden" name="leagueId">
	<input type="hidden" name="round">
	<input type="hidden" name="year">
</form>